package org.lq.com.qht.ui;

import java.awt.BorderLayout;
import java.awt.EventQueue;

import javax.swing.JFrame;
import javax.swing.JPanel;
import javax.swing.border.EmptyBorder;
import javax.swing.border.TitledBorder;
import javax.swing.UIManager;
import java.awt.Color;
import java.awt.event.MouseAdapter;
import java.awt.event.MouseEvent;
import javax.swing.JButton;

public class addInfoNew extends JFrame {

	private JPanel contentPane;

	/**
	 * Launch the application.
	 */
	public static void main(String[] args) {
		EventQueue.invokeLater(new Runnable() {
			public void run() {
				try {
					addInfoNew frame = new addInfoNew();
					frame.setVisible(true);
				} catch (Exception e) {
					e.printStackTrace();
				}
			}
		});
	}

	/**
	 * Create the frame.
	 */
	public addInfoNew() {
//		setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
		setBounds(100, 100, 855, 599);
		contentPane = new JPanel();
		contentPane.setBorder(new EmptyBorder(5, 5, 5, 5));
		contentPane.setLayout(null);
		
		addInfos add = new addInfos();
		add.addMouseListener(new MouseAdapter() {
			@Override
			public void mousePressed(MouseEvent e) {

				
			}
			@Override
			public void mouseReleased(MouseEvent e) {
				if(add.getFlag()) {
					dispose();
				}
			}
		});
		add.setBorder(new TitledBorder(UIManager.getBorder("TitledBorder.border"), "\u5408\u540C\u6DFB\u52A0", TitledBorder.LEADING, TitledBorder.TOP, null, new Color(0, 0, 0)));
//		contentPane.add(add);
		add.setVisible(true);
		
		System.out.println(add.getFlag()+"----------------");
		
		setContentPane(add);
		
		JButton btnNewButton = new JButton("\u5B89\u5168\u9000\u51FA");
		btnNewButton.addMouseListener(new MouseAdapter() {
			@Override
			public void mousePressed(MouseEvent e) {
				if(add.getFlag()) {
					dispose();
				}
			}
		});
		btnNewButton.setBounds(722, 513, 93, 23);
		add.add(btnNewButton);
		
		
	}

}
